package com.yc.booktable.mapper;

import com.yc.booktable.entity.Bookinfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zbh
 * @since 2022-06-06
 */
@Mapper
public interface BookinfoMapper extends BaseMapper<Bookinfo> {

    @Select("SELECT b.bid,b.date,b.number,b.mark,b.`status` from bookinfo b JOIN ubookinfo u ON b.bid=u.bid WHERE id= #{id}")
    List<Bookinfo>  selectUserBook(Long id);
}
